import request from '@/utils/request'
export function getPermissionList() {
    return request({
        url: '/permission',
        method: 'get',
    })
}
export function setPermission(rid, data) {
    console.log(data)
    return request({
        url: `/set_permission/${rid}/`,
        method: "post",
        data
    })
}
export function getPermission(rid) {
    return request({
        url: "/GetPermissionlist",
        method: "get",
        params: {
            'rid': rid
        }
    })
}
export function addPermission(data) {
    return request({
        url: "/permission",
        method: "POST",
        data
    })
}
export function updatePermission(data) {
    return request({
        url: "/permission",
        method: "PUT",
        data
    })
}
export function deletePermission(id) {
    return request({
        url: "/permission",
        method: "delete",
        params: {
            'id': id
        }
    })
}